﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using ICarry.DataModel;

namespace ICarry.WebApi.Controllers
{
	public class UserController : ApiController
	{


		public string Get(int id)
		{

			ICarryEntities _context;

			using (_context = new ICarryEntities())
			{
				string name = (from row in _context.tuser
							   where row.Id == id
							   select row.Name).SingleOrDefault();

				return name;
			}
		}

		public void Post([FromBody]string value)
		{
		}

		public void Put(int id, [FromBody]string value)
		{
		}

		public void Delete(int id)
		{
		}
	}
}